/***************************************************************************
 *   Copyright (C) 2007 by Phillip Aldridge   *
 *   phillip@imi21.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#include "ftpdlg.h"
#include <qpushbutton.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qspinbox.h>
#include <qlineedit.h>

FtpDlg::FtpDlg(QWidget* parent):
         QDialog( parent)
{
   setCaption ( "FTP Configuration");
   QBoxLayout* topLayout = new QVBoxLayout( this,5,5 );
   QGridLayout * g1 = new QGridLayout( topLayout,4,2,5  );

   QBoxLayout * b5 = new QHBoxLayout(topLayout );
   QBoxLayout * bButtons = new QHBoxLayout( topLayout);

   QLabel *label1 = new QLabel( "Host : ", this );
   g1->addWidget( label1,0,0);
   QLineEdit *le1= new QLineEdit(this);
   g1->addWidget( le1,0,1);

   QLabel *label2 = new QLabel( "Path : ", this );
   g1->addWidget( label2,1,0);
   QLineEdit *le2= new QLineEdit(this);
   g1->addWidget( le2,1,1);

   QLabel *label3 = new QLabel( "User : ", this );
   g1->addWidget( label3,2,0);
   QLineEdit *le3= new QLineEdit(this);
   g1->addWidget( le3,2,1);

   QLabel *label4 = new QLabel( "Password : ", this );
   g1->addWidget( label4,3,0);
   QLineEdit *le4= new QLineEdit(this);
   g1->addWidget( le4,3,1);

   QPushButton *but5 = new QPushButton( "&Test connection", this );
   b5->addWidget( but5);
   QLabel *label5 = new QLabel( "unknown", this );
   b5->addWidget( label5);

   butReset = new QPushButton("&Reset", this);
   butCancel = new QPushButton("&Cancel", this);
   butOK = new QPushButton("&OK", this );
   bButtons->addWidget( butReset );
   bButtons->addWidget( butCancel );
   bButtons->addWidget( butOK );

   topLayout->activate();
   connect( butReset, SIGNAL( clicked() ), this, SLOT( reset() ) ); 
   connect( butCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
   connect( butOK, SIGNAL( clicked() ), this, SLOT( accept() ) );
}


FtpDlg::~FtpDlg()
{
}
void FtpDlg::reset()
{
   qDebug( "Reset");
}

void FtpDlg::accept()
{
   qDebug( "Accept");
   QDialog::accept();
}
void FtpDlg::reject()
{
   qDebug( "Reject");
   QDialog::reject();
}


